/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package photoshare.services;

import java.sql.SQLException;
import java.util.ArrayList;
import photoshare.dao.AlbumDAO;
import photoshare.dto.AlbumDTO;

/**
 *
 * @author PhotoShare
 */
public class AlbumService {

    public AlbumService() {
    }
     public boolean create(AlbumDTO albumDTO) throws SQLException {
        return new AlbumDAO().create(albumDTO);
    }

    public ArrayList<AlbumDTO> findAll() {
        return new AlbumDAO().readAll();
    }

    public AlbumDTO readById(Integer albumId) {
        return new AlbumDAO().readById(albumId);
    }

    public boolean updateById(AlbumDTO albumDTO, Integer albumId) throws SQLException {
        return new AlbumDAO().updateById(albumDTO, albumId);
    }

    public boolean deleteById(Integer albumId) throws SQLException {
        return new AlbumDAO().deleteById(albumId);
    }

}
